SyncChnInfo

Function

This API is used by the hot standby management device to synchronize channel information of the working device to a regular hot standby device. Upon receiving this information, the hot standby device will add these devices and take over the video recording duties of the working device.

Request Message

Parameter Description

Table 1

ParameterRangeTypeDescription
worker_ipstringThe IP address of the working device.
worker_macstringThe MAC address of the working device.
channels"All"
"CH1"…"CHx"
"IP_CH1"…"IP_CHx"
"WIFI_CH1"…"WIFI_CHx"
objectFor detailed information, please refer to Table 2.

Table 2

ParameterRangeTypeDescription
enableboolWhether to enable the channel.
channel_indexintChannel number of the frontend device.
protocolstring
connect_method"General", "Security"string"General": Prefer HTTP
"Security": Prefer HTTPS
camera_mode"Auto", "Normal"stringCamera mode.
main_urlstringThe url of the main stream when connecting using rtsp.
sub_urlstringThe url of the substream when connecting using rtsp.
ipstring
usernamestring
peer_keystring
cipherstringEncrypted password.
seqint
portint

Sample:

POST /API/RecordPatch/SyncChnInfo HTTP/1.1
{
    "data":{
        "worker_ip": 172.16.11.34,
        "worker_mac": "xx-xx-xx-xx-xx-xx",
        "channels": {
            "CH1": {
                "enable": true,
                "channel_index": 0,
                "protocol": "Private",
                "connect_method": "General",
                "camera_mode": "Auto",
                "main_url": "",
                "sub_url": "",
                "ip": "172.16.11.50",
                "username": "admin",
                "peer_key": "07uKqG8PGyqWLbqt7vN18Rqg4p17+UfRmcZAZQ0NKDAc=",
                "cipher": "0XfBrLSeFZiEFjNl0tiMauJ/aWDkuTvDXHextl1fZrgppV4KEUw==",
                "seq": 0,
                "port": 80
            }
        }
    }
}

Response Message

None

Sample:

HTTP/1.1 200 OK
Content-Type: application/json
{
    "result": "success"
}